﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PSLib.CodeFormating.Lexems;
using PSLib.CodeFormating.Adapters;

namespace LineEditTest
{
	public class ParseManager
	{
		private static ParseManager current;
		public static ParseManager Current
		{
			get
			{
				if (current == null) current = new ParseManager();
				return current;
			}
		}

		public ParseManager()
		{
		}

		public LexemList ParseSource(string source, bool endsWithBreakLine)
		{
			return LexemParser.Parse(source, this.LanguageAdapter, endsWithBreakLine);
		}

		public LanguageAdapter LanguageAdapter { get; set; }
	}
}
